using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace MicroMsg.UI.UserContrl
{
	public class Group<T> : ObservableCollection<T>
	{
		public string Key
		{
			get;
			set;
		}
		public bool HasItems
		{
			get
			{
				return 0 != base.get_Count();
			}
			set
			{
			}
		}
		public Group(string name, IEnumerable<T> items)
		{
			this.Key = name;
			if (items != null)
			{
				using (IEnumerator<T> enumerator = items.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						T current = enumerator.get_Current();
						base.Add(current);
					}
				}
			}
		}
		public override bool Equals(object value)
		{
			Group<T> group = value as Group<T>;
			return group != null && this.Key.Equals(group.Key);
		}
		public override int GetHashCode()
		{
			return base.GetHashCode();
		}
	}
}
